package com.task.core.mapper;

import java.util.List;

import com.task.core.domain.DatasourceInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.task.common.domain.info.KeyAndValue;
import com.task.core.domain.RefererSourceInfo;
import com.task.core.domain.info.RelationMissionSourceUseDataCountInfo;
import com.task.core.dto.request.RefererSourceRequestDTO;

/**
 * @author 迪迦.
 * @date 2024/11/4 17:35
 */
@Mapper
public interface RefererSourceMapper {

  List<RefererSourceInfo> getRefererSourceByPage(RefererSourceRequestDTO request);

  RefererSourceInfo getRefererSourceByCode(String code);

  List<KeyAndValue> getRefererSourceForOption(RefererSourceRequestDTO request);

  void addRefererSource(RefererSourceRequestDTO request);

  Integer modifyRefererSource(RefererSourceRequestDTO request);

  Integer deleteRefererSource(@Param("code") String refererSourceCode, @Param("userId") Long userId);

  void updateDataCount(@Param("intValue") Integer intValue, @Param("dataSourceCode") String dataSourceCode);

  List<RelationMissionSourceUseDataCountInfo> getMissionPageRefererInfoByRefererCodes(@Param("sourceCodeList") List<String> sourceCodeList);

  void deleteMissionRefererRelation(String refererSourceCode);

  void deleteRelationMissionSourceUseDataCount(String refererSourceCode);

    List<RefererSourceInfo> getRefererSourceByCodes(List<String> sourceCodeList);

    //void incrementUseCount(@Param("code") String chooseCode);
  //
  //void decrementUseCount(@Param("code") String sourceCode);
}
